// pages/index/receive/list.js
Page({
  data: {
  },
  onLoad: function (op) {
    var list = JSON.parse(op.list), friends = [];
    for (let i = 0; i < list.length; i++) {
      friends.push({
        id: i + 1,
        avatar: list[i].avatar,
        nick: list[i].nick,
        total: list[i].total
      })
    }
    this.setData({friends: friends});
    console.log(this.data.friends);
    
  },  
  onShow: function () {

  },

  onHide: function () {
    wx.redirectTo({ url: 'receive' })
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})